﻿// Decompiled with JetBrains decompiler
// Type: DnProcessSimulateCommands.LoadEntityLevel.CApLoadEntityLevelApp
// Assembly: DnProcessSimulateCommands, Version=2402.0.0.890, Culture=neutral, PublicKeyToken=null
// MVID: A885D881-AEDF-447E-852A-6F13102E089C
// Assembly location: C:\Program Files\Tecnomatix_2402\eMPower\DotNetCommands\DnProcessSimulateCommands.dll

using DnProcessSimulateCommands.DetailedDataUtils;
using Tecnomatix.Engineering;


namespace DnProcessSimulateCommands.LoadEntityLevel;

internal class CApLoadEntityLevelApp : CApDduLoadDetailedDataBaseApp
{
  internal CApLoadEntityLevelApp(CUiEntityLevelEnabler enabler)
  {
    this.m_enabler = (CUiDtuBaseEnabler) enabler;
  }

  protected override void InitMessages()
  {
    if (this.m_isMessagesInit)
      return;
    this.CommandName = LoadEntityLevelStringTable.CMD_NAME;
    this.ManyComponentsWithSubsMessage = LoadEntityLevelStringTable.CMD_WARNING_MSG_MORE_THAN_20_OBJS;
    this.CannotDisplayComponentsMsg = LoadEntityLevelStringTable.CMD_WARNING_MSG_CANNOT_DISPLAY_COMPONENTS;
    this.FailedLoadComponentsMsg = LoadEntityLevelStringTable.CMD_WARNING_MSG_FAILED_LOAD_COMPONENTS;
    this.m_isMessagesInit = true;
  }

  protected override bool HasDetailedData(TxLibraryStorage libraryStorageObject)
  {
    return libraryStorageObject.HasDetailedRepresentation;
  }

  protected override void LoadDetailed(TxLibraryStorage libraryStorageObject)
  {
    libraryStorageObject.Reload((TxRepresentationLevel) 5);
  }
}
